package net.hn.hnms.biz.plan;


import net.hn.hnms.biz.plan.service.impl.BaseService;
import net.hn.hnms.sys.common.mybatis.config.MybatisMineCodeConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.PostConstruct;
import java.util.TimeZone;


/**
 * 计划管理
 *
 * @author zhaoyang
 */
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "net.hn.hnms")
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@ComponentScan(basePackages = {"net.hn.hnms"})
@EnableScheduling
public class PlanApplication {
    @PostConstruct
    void init() {
        TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
    }
    public static void main(String[] args) {

        SpringApplication application = new SpringApplication(PlanApplication.class);
        ApplicationContext applicationContext = application.run(args);
        MybatisMineCodeConfiguration bean = applicationContext.getBean(MybatisMineCodeConfiguration.class);
        BaseService.setRemoteUserService(applicationContext);
        System.out.println("(♥◠‿◠)ﾉﾞ  计划管理模块启动成功   ლ(´ڡ`ლ)ﾞ  ");
    }
}
